#include <stdio.h>
#include <malloc.h>
#include "eventListTest.h"

int main()
{
	struct eventList el = {0};

	struct event *ev[10] ;
	int i = 0 ;

	for(; i < 10; i++){
		ev[i] = (struct event *)malloc(sizeof(struct event));
		ev[i]->prev = NULL ;
		ev[i]->next = NULL ;
		ev[i]->nodeValue = i;
	}
	eventListInit(&el);

	for(i = 0; i < 10; i++){
		eventAdd(&el, ev[i]);
	}

	printf("NodeNum = %d\n", el.nodeNum);

	eventRm(&el, ev[5]);

	struct event *e = el.head;
	while(e){
		printf("%d\n", e->nodeValue);
		e = e->next;
	}

	printf("NodeNum = %d\n", el.nodeNum);

	return 0;
}